#include "Tank.h"
#include <QImage>
#include <QPoint>

Tank::Tank(QObject *parent) : QObject(parent)
{
    tank=QImage(":/map_image/element/tank.png");
    pos_x=tank.width();
    pos_y=tank.height();
}

void Tank::DrawTank(QPainter* p)
{
    p->drawImage(QPoint(pos_x,pos_y),tank);
}

void Tank::move(int dx,int dy)
{
    pos_x=dx+pos_x;
    pos_y=dy+pos_y;
}
